<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>
    <input type="text" id="ipt">
    <button id="btn">我是一个按钮</button>
<body>
    <script>
        const ipt = document.querySelector('#ipt')
        const btn = document.querySelector('#btn')
        const Axios1 = axios.create({
            baseURL:'/',
            timeout:10000,
            headers:{}
        })
        Axios1.interceptors.response.use((res)=>{
            console.log(res);
            return res
        })
        btn.onclick = async function(){
            const values = ipt.values
            const A = await Axios1.get('/axios',{
                params:{
                    userID:values
                }
            })
        }
    </script>
</body>
</html>